<!DOCTYPE html>
<html>
<head lang="en">
    <meta charset="UTF-8">
    <title></title>
</head>
<body>
<a href="http://yalishizhude.github.io/">underscore</a>
<a href="http://www.css88.com/doc/underscore/"> unbersocre文档 </a>
<ul>
    <li>
        Collections（集合）
        each, map, reduce, reduceRight, find, filter, reject, all, any, include, invoke,pluck, max, min, sortBy, groupBy, sortedIndex, shuffle, toArray, size
    </li>
    <li>
        Arrays（数组）
        first, initial, last, rest, compact, flatten, without, union, intersection,difference, uniq, zip, indexOf, lastIndexOf, range
    </li>
    <li>
        Functions（函数）
        bind, bindAll, memoize, delay, defer, throttle, debounce, once, after, wrap,compose
    </li>
    <li>
        Objects（对象）
        keys, values, functions, extend, defaults, clone, tap, isEqual, isEmpty,isElement, isArray, isArguments, isFunction, isString, isNumber, isBoolean,isDate, isRegExp, isNaN, isNull, isUndefined
    </li>
    <li>
        Utility（功能）
        noConflict, identity, times, mixin, uniqueId, escape, template
    </li>
    <li>
        Chaining
        chain, value
    </li>
</ul>
<input type="text" id="search" name="search" value="" />
<script type="text/javascript" src="underscore.js"></script>
<script type="text/javascript" src="../JQ/jquery-2.1.1.js"></script>
<script>
    var arr = [1,2,3,20];
    var vol = _(arr).chain().map(function(item){ return item++; }).value();
    console.log(vol);

    var query = _(function(){
        var str = $('#search').val();
        alert(str);
    }).debounce(5000);
    $('#search').bind('keypress',query);
</script>
</body>
</html>
